<?php
require_once("func.php");


if(!empty($_POST['submit']))
{
	if($_POST['submit'] === "submit")
	{
		$sql = "insert into todos (pid,txt,date_added) values ('".$_POST['pid']."','".$_POST['txt']."',NOW())";
		dbq($sql);
		header("Location: index.php");
		exit();
	}
}

?>